package com.yifushidai.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_opt_device_log")
@ApiModel(value = "操作日志")
public class OptDeviceLog {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "自动编号")
    @JSONField(serialize = false)
    private Long id;

    @Column(name = "address_socket")
    @ApiModelProperty(value = "已废除")
    private String addressSocket;

    @ApiModelProperty(value = "已废除")
    private String mobile;

    @Column(name = "log_type")
    @ApiModelProperty(value = "日志类型(APP=移动端,MAC=设备端)")
    private String logType;

    @Column(name = "unique_mac")
    @ApiModelProperty(value = "联网mac")
    private String uniqueMac;

    @Column(name = "power_mac")
    @ApiModelProperty(value = "控电mac")
    private String powerMac;

    @ApiModelProperty(value = "别名/URL")
    private String alias;

    @Column(name = "opt_desc")
    @ApiModelProperty(value = "操作描述")
    private String optDesc;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "opt_time")
    @ApiModelProperty(value = "操作时间")
    private Date optTime;
}